home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / lochelp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  3.1 KB  |  81 lines

  1. #ifndef __STD_RW_LOCHELP__
  2. #define __STD_RW_LOCHELP__
  3. #pragma option push -b -a4 -Vx- -Ve- -w-inl -w-aus -w-sig
  4.  
  5. /***************************************************************************
  6.  *
  7.  * rw/lochelp - Declarations for the Standard Library locale helper classes.
  8.  *
  9.  * $Id: lochelp,v 1.5 1996/10/02 01:48:00 smithey Exp $
  10.  *
  11.  * This header defines some classes that are used by some of the source (cpp)
  12.  * files in src/locale, mainly for manipulating the C library locale.  This
  13.  * header is not included by any other header, and never ends up in user code.
  14.  * See locale.cpp for implementation.
  15.  *
  16.  ***************************************************************************
  17.  *
  18.  * (c) Copyright 1994, 1995 Rogue Wave Software, Inc.
  19.  * ALL RIGHTS RESERVED *
  20.  * The software and information contained herein are proprietary to, and
  21.  * comprise valuable trade secrets of, Rogue Wave Software, Inc., which
  22.  * intends to preserve as trade secrets such software and information.
  23.  * This software is furnished pursuant to a written license agreement and
  24.  * may be used, copied, transmitted, and stored only in accordance with
  25.  * the terms of such license and with the inclusion of the above copyright
  26.  * notice.  This software and information or any other copies thereof may
  27.  * not be provided or otherwise made available to any other person.
  28.  *
  29.  * Notwithstanding any other lease or license that may pertain to, or
  30.  * accompany the delivery of, this computer software and information, the
  31.  * rights of the Government regarding its use, reproduction and disclosure
  32.  * are as set forth in Section 52.227-19 of the FARS Computer
  33.  * Software-Restricted Rights clause.
  34.  *
  35.  * Use, duplication, or disclosure by the Government is subject to
  36.  * restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
  37.  * Technical Data and Computer Software clause at DFARS 252.227-7013.
  38.  * Contractor/Manufacturer is Rogue Wave Software, Inc.,
  39.  * P.O. Box 2328, Corvallis, Oregon 97339.
  40.  *
  41.  * This computer software and information is distributed with "restricted
  42.  * rights."  Use, duplication or disclosure is subject to restrictions as
  43.  * set forth in NASA FAR SUP 18-52.227-79 (April 1985) "Commercial
  44.  * Computer Software-Restricted Rights (April 1985)."  If the Clause at
  45.  * 18-52.227-74 "Rights in Data General" is specified in the contract,
  46.  * then the "Alternate III" clause applies.
  47.  *
  48.  **************************************************************************/
  49.  
  50.  
  51. #ifndef _RWSTD_NO_NEW_HEADER
  52. #include <clocale>
  53. #else
  54. #include <locale.h>
  55. #endif
  56.  
  57. #ifndef _RWSTD_NO_NAMESPACE
  58. namespace __rwstd {
  59. #endif
  60.  
  61. // ------------------------------------------------
  62. // Implementation helper class -- use_Clib_locale.
  63. // ------------------------------------------------
  64.  
  65. class _RWSTDExport use_Clib_locale {
  66.   int saved_cat;
  67.   char *previous_locale_name;
  68.  public:
  69.   use_Clib_locale (const char *name=NULL,int cat=LC_ALL);
  70.  ~use_Clib_locale (void);
  71.  
  72.   operator bool (void) const { return previous_locale_name!=NULL; }
  73. };
  74.  
  75. #ifndef _RWSTD_NO_NAMESPACE
  76. } // namespace __rwstd
  77. #endif
  78.  
  79. #pragma option pop
  80. #endif // __STD_RW_LOCHELP__
  81.